package com.mes.pojo.device;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

/**
 * @Author 张喆
 * @Company
 * @Description 设备类型类
 * @Time 2024/10/16 16:41
 */

public class DeviceType {
    private String deviceTypeId;
    private String deviceTypeName;
    private String deviceTypeNotes;
    private Integer deviceTypeStatus;
    private Integer deviceTypeParent;
    private String deviceTypeParentId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deviceTypeCreateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deviceTypeModifyTime;
    private List<DeviceType> children;
    private Boolean hasChildren;

    public List<DeviceType> getChildren() {
        return children;
    }

    public void setChildren(List<DeviceType> children) {
        this.children = children;
    }

    public Boolean getHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(Integer deviceTypeParent) {
        this.deviceTypeParent = deviceTypeParent;
        if (this.deviceTypeParent.equals(0)){
            this.hasChildren = true;
        }else {
            this.hasChildren = false;
        }
    }

    public String getDeviceTypeId() {
        return deviceTypeId;
    }

    public void setDeviceTypeId(String deviceTypeId) {
        this.deviceTypeId = deviceTypeId;
    }

    public String getDeviceTypeName() {
        return deviceTypeName;
    }

    public void setDeviceTypeName(String deviceTypeName) {
        this.deviceTypeName = deviceTypeName;
    }

    public String getDeviceTypeNotes() {
        return deviceTypeNotes;
    }

    public void setDeviceTypeNotes(String deviceTypeNotes) {
        this.deviceTypeNotes = deviceTypeNotes;
    }

    public Integer getDeviceTypeStatus() {
        return deviceTypeStatus;
    }

    public void setDeviceTypeStatus(Integer deviceTypeStatus) {
        this.deviceTypeStatus = deviceTypeStatus;
    }

    public Integer getDeviceTypeParent() {
        return deviceTypeParent;
    }

    public void setDeviceTypeParent(Integer deviceTypeParent) {
        this.deviceTypeParent = deviceTypeParent;
    }

    public String getDeviceTypeParentId() {
        return deviceTypeParentId;
    }

    public void setDeviceTypeParentId(String deviceTypeParentId) {
        this.deviceTypeParentId = deviceTypeParentId;
    }

    public Date getDeviceTypeCreateTime() {
        return deviceTypeCreateTime;
    }

    public void setDeviceTypeCreateTime(Date deviceTypeCreateTime) {
        this.deviceTypeCreateTime = deviceTypeCreateTime;
    }

    public Date getDeviceTypeModifyTime() {
        return deviceTypeModifyTime;
    }

    public void setDeviceTypeModifyTime(Date deviceTypeModifyTime) {
        this.deviceTypeModifyTime = deviceTypeModifyTime;
    }

}
